//
//  MSUtil.h
//  Musou
//
//  Created by luo danal on 4/24/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

/*
 * Functions
 */

void MSTransitionPushViewController(id navigationController, id controller);

void MSTransitionPopViewController(id navigationController);

BOOL MSIsIPad();

void MSShowMessage(NSString *msg);

typedef enum {
    MSHUDTypeOK = 1,
    MSHUDTypeFailed = 2,
    MSHUDTypeWarning = 3
} MSHUDType;

void MSShowHUDMessage(NSString *msg,UIView *toView,MSHUDType type);

BOOL MSIsCacheExpired(NSString *typeKey);

void MSUpdateCacheDate(NSDate *date, NSString *typeKey);

NSString *MSDateStrFormatted(NSString *dateStr);

void MSSetIntForKey(NSInteger ival,NSString *key);

NSInteger MSIntForKey(NSString *key);

void MSSetStrForKey(NSString *str,NSString *key);

NSString *MSStrForKey(NSString *key);

NSString *MSResPath(NSString *file);

void PlayEffect(NSString *file);

typedef enum {
   kRounderCornerPostionAll = 0,
   kRounderCornerPostionTop,
   kRounderCornerPostionLeft,
   kRounderCornerPostionBottom,
   kRounderCornerPostionRight,
} RounedCornerPosition;

//void CGRectAddRoundedCornerPath(CGRect rect, float corner, CGContextRef c);

void CGPathAddRoundedCornerPath(CGRect rect, float corner, RounedCornerPosition position, CGContextRef c);

//Tags

enum {
    kTagAlert1 = 10000,
    kTagAlert2,
    kTagButton1,
    kTagButton2,
    kTagSheet1,
    kTagSheet2,
    kTagView1,
    kTagView2,
};